<?php
$data=[
    "type"=> "color",
    "name"=> "red", 
    "count"=> "1",
];

$result=match($data){
    [
        "type"=> "color",
        "name"=> "red",
        "count"=> "1",
    ]=>"红色",
    [
        "type"=> "color",
        "name"=> "blue",
        "count"=>  "3",
    ]=>"蓝色",
    default=>"都不是",
};
var_dump($result);
